chars = input("please input your eval:")
e = eval(chars)
a = int(e[0])
b = int(e[1])

# get smaller from a and b
smaller = a
if a>b:
    smaller = b

max_cal = 0

for i in range(2,smaller+1):
    if (a%i==0) and (b%i==0):
        # i is the max cal
        # i from 1 ....smaller,so max_cal is the bigger
        max_cal = i

if max_cal > 0:
    if b/max_cal == 1:
        print(int(a/max_cal))
    else:
        print(str(int(a/max_cal))+'/'+str(int(b/max_cal)))
else:
    print(str(a)+'/'+str(b))
